package com.sdleyou.treepro.business.api.broadcast;

import com.sdleyou.treepro.common.model.utils.ResultVOUtil;
import com.sdleyou.treepro.common.model.vo.ResultVO;
import com.sdleyou.treepro.common.service.UserBroadcastManager;
import com.sdleyou.treepro.system.version.ApiVersion;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api")
public class BroadcastController {
    @Autowired
    private UserBroadcastManager userBroadcastManager;

    @ApiVersion(1)
    @GetMapping("/{version}/broadcast")
    public ResultVO broadcastList() {
        return ResultVOUtil.success(userBroadcastManager.broadcasts());
    }
}
